class TipoVisitaMedica < ActiveRecord::Base
  acts_as_paranoid unless SHOW_DELETED
  has_many :visite_mediche, :dependent => :protect, :class_name => 'VisitaMedica', :class_name => 'VisitaMedica'
  has_and_belongs_to_many :mansioni, :join_table => 'mansioni_tipi_visita_medica', :uniq => true
  validates_presence_of :name, :validita
  validates_uniqueness_of :name, :scope => :deleted_at, :case_sensitive => false
end
